package com.finger.utils;


import org.springframework.stereotype.Component;

@Component
public class MemoryRetentionRate {
    private double MemoryRetentionRate;
    private double TimePassed;
    private final int InitialMemoryRetentionRate = 1;
    private final double ForgettingRate = 0.56;
    private final double MemoryIntensity = 0.06;
    public double getMemoryRetentionRate(double timePassed) {
        this.TimePassed = timePassed;
        MemoryRetentionRate = InitialMemoryRetentionRate - ForgettingRate * Math.pow(TimePassed,MemoryIntensity);
        return MemoryRetentionRate;
    }
}
